package srjava.messages;

import java.io.IOException;
import java.io.StringReader;

public class TaskStatusChange extends Message {
	TaskInfo taskInfo;
	SrString serverName;
	
	public TaskStatusChange() {
		this.msgType = MessageType.TASK_STATUS_CHANGE;
		this.taskInfo = new TaskInfo();
		this.serverName = new SrString("");
	}

	public TaskStatusChange(TaskInfo taskInfo, SrString name) {
		this.msgType = MessageType.TASK_STATUS_CHANGE;
		this.taskInfo = taskInfo;
		this.serverName = name;
	}

	@Override
	public String serialize() {
		String pom = super.serialize() + taskInfo.serialize() + serverName.serialize();
		return pom;
	}

	@Override
	public void deSerialize(StringReader s) throws IOException {
		taskInfo.deSerialize(s);
		serverName.deSerialize(s);
	}

	public TaskInfo getTaskInfo() {
		return taskInfo;
	}

	public void setTaskInfo(TaskInfo taskInfo) {
		this.taskInfo = taskInfo;
	}

	public SrString getServerName() {
		return serverName;
	}

	public void setServerName(SrString serverName) {
		this.serverName = serverName;
	}
	
	
}
